﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AusProject.OrderComponents
{
    public class OrderComponentInfo
    {
        private int id;

        public int Id
        {
            get { return id; }

            //TODO: remove following line (use for testing only)
            set { id = value; }
        }

        public string Title { get; set; }

        public int Width { get; set; }

        public ComponentColumnInfo[] Columns { get; set; }

        public OrderComponentInfo(int id, string title, int width, ComponentColumnInfo[] columns)
        {
            this.id = id;
            Title = title;
            Width = width;
            Columns = columns;
        }

        public OrderComponentInfo(string title, int width, ComponentColumnInfo[] columns)
        {
            this.id = -1;
            Title = title;
            Width = width;
            Columns = columns;
        }

        public override string ToString()
        {
            return Title;
        }
    }
}
